package day_4.demo2;/*
 *@ 代阳敲的专属代码
 **/

public class Teacher extends Person {
    private double salary;

    public Teacher(String name, int age, double salary) {
        super(name, age);
        this.salary = salary;
    }
    public double getSalary() {
        return salary;
    }
    public void setSalary(double salary) {
        this.salary = salary;
    }
    public String say(){
       return "老师"+super.say()+"工资为"+salary;
    }
    public void teach() {
        System.out.println("老师 " + getName() + " 正在讲 java 课程...");
    }

}
